(0) Obligation:

Clauses:

rotate(X, Y) :- ','(append2(A, B, X), append1(B, A, Y)).
append1(.(X, Xs), Ys, .(X, Zs)) :- append1(Xs, Ys, Zs).
append1([], Ys, Ys).
append2(.(X, Xs), Ys, .(X, Zs)) :- append2(Xs, Ys, Zs).
append2([], Ys, Ys).

Query: rotate(g,a)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

append2A(.(T32, X89), X90, .(T32, T33)) :- append2A(X89, X90, T33).
append2A([], T38, T38).
append1B(.(T64, T65), T66, T67, .(T64, T69)) :- append1B(T65, T66, T67, T69).
append1B([], T79, T80, .(T79, T80)).
append1C(.(T102, T103), .(T102, T105)) :- append1C(T103, T105).
append1C([], []).
rotateD(.(T16, T17), T7) :- append2A(X40, X41, T17).
rotateD(.(T16, T17), T7) :- ','(append2A(T20, T21, T17), append1B(T21, T16, T20, T7)).
rotateD(T86, T7) :- append1C(T86, T7).

Query: rotateD(g,a)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
rotateD_in: (b,f)
append2A_in: (f,f,b)
append1B_in: (b,b,b,f)
append1C_in: (b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

rotateD_in_ga(.(T16, T17), T7) → U4_ga(T16, T17, T7, append2A_in_aag(X40, X41, T17))
append2A_in_aag(.(T32, X89), X90, .(T32, T33)) → U1_aag(T32, X89, X90, T33, append2A_in_aag(X89, X90, T33))
append2A_in_aag([], T38, T38) → append2A_out_aag([], T38, T38)
U1_aag(T32, X89, X90, T33, append2A_out_aag(X89, X90, T33)) → append2A_out_aag(.(T32, X89), X90, .(T32, T33))
U4_ga(T16, T17, T7, append2A_out_aag(X40, X41, T17)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(.(T16, T17), T7) → U5_ga(T16, T17, T7, append2A_in_aag(T20, T21, T17))
U5_ga(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → U6_ga(T16, T17, T7, append1B_in_ggga(T21, T16, T20, T7))
append1B_in_ggga(.(T64, T65), T66, T67, .(T64, T69)) → U2_ggga(T64, T65, T66, T67, T69, append1B_in_ggga(T65, T66, T67, T69))
append1B_in_ggga([], T79, T80, .(T79, T80)) → append1B_out_ggga([], T79, T80, .(T79, T80))
U2_ggga(T64, T65, T66, T67, T69, append1B_out_ggga(T65, T66, T67, T69)) → append1B_out_ggga(.(T64, T65), T66, T67, .(T64, T69))
U6_ga(T16, T17, T7, append1B_out_ggga(T21, T16, T20, T7)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(T86, T7) → U7_ga(T86, T7, append1C_in_ga(T86, T7))
append1C_in_ga(.(T102, T103), .(T102, T105)) → U3_ga(T102, T103, T105, append1C_in_ga(T103, T105))
append1C_in_ga([], []) → append1C_out_ga([], [])
U3_ga(T102, T103, T105, append1C_out_ga(T103, T105)) → append1C_out_ga(.(T102, T103), .(T102, T105))
U7_ga(T86, T7, append1C_out_ga(T86, T7)) → rotateD_out_ga(T86, T7)

The argument filtering Pi contains the following mapping:
rotateD_in_ga(x1, x2)  =  rotateD_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
append2A_in_aag(x1, x2, x3)  =  append2A_in_aag(x3)
U1_aag(x1, x2, x3, x4, x5)  =  U1_aag(x1, x5)
append2A_out_aag(x1, x2, x3)  =  append2A_out_aag(x1, x2)
rotateD_out_ga(x1, x2)  =  rotateD_out_ga
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
append1B_in_ggga(x1, x2, x3, x4)  =  append1B_in_ggga(x1, x2, x3)
U2_ggga(x1, x2, x3, x4, x5, x6)  =  U2_ggga(x1, x6)
[]  =  []
append1B_out_ggga(x1, x2, x3, x4)  =  append1B_out_ggga(x4)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
append1C_in_ga(x1, x2)  =  append1C_in_ga(x1)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append1C_out_ga(x1, x2)  =  append1C_out_ga(x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

rotateD_in_ga(.(T16, T17), T7) → U4_ga(T16, T17, T7, append2A_in_aag(X40, X41, T17))
append2A_in_aag(.(T32, X89), X90, .(T32, T33)) → U1_aag(T32, X89, X90, T33, append2A_in_aag(X89, X90, T33))
append2A_in_aag([], T38, T38) → append2A_out_aag([], T38, T38)
U1_aag(T32, X89, X90, T33, append2A_out_aag(X89, X90, T33)) → append2A_out_aag(.(T32, X89), X90, .(T32, T33))
U4_ga(T16, T17, T7, append2A_out_aag(X40, X41, T17)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(.(T16, T17), T7) → U5_ga(T16, T17, T7, append2A_in_aag(T20, T21, T17))
U5_ga(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → U6_ga(T16, T17, T7, append1B_in_ggga(T21, T16, T20, T7))
append1B_in_ggga(.(T64, T65), T66, T67, .(T64, T69)) → U2_ggga(T64, T65, T66, T67, T69, append1B_in_ggga(T65, T66, T67, T69))
append1B_in_ggga([], T79, T80, .(T79, T80)) → append1B_out_ggga([], T79, T80, .(T79, T80))
U2_ggga(T64, T65, T66, T67, T69, append1B_out_ggga(T65, T66, T67, T69)) → append1B_out_ggga(.(T64, T65), T66, T67, .(T64, T69))
U6_ga(T16, T17, T7, append1B_out_ggga(T21, T16, T20, T7)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(T86, T7) → U7_ga(T86, T7, append1C_in_ga(T86, T7))
append1C_in_ga(.(T102, T103), .(T102, T105)) → U3_ga(T102, T103, T105, append1C_in_ga(T103, T105))
append1C_in_ga([], []) → append1C_out_ga([], [])
U3_ga(T102, T103, T105, append1C_out_ga(T103, T105)) → append1C_out_ga(.(T102, T103), .(T102, T105))
U7_ga(T86, T7, append1C_out_ga(T86, T7)) → rotateD_out_ga(T86, T7)

The argument filtering Pi contains the following mapping:
rotateD_in_ga(x1, x2)  =  rotateD_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
append2A_in_aag(x1, x2, x3)  =  append2A_in_aag(x3)
U1_aag(x1, x2, x3, x4, x5)  =  U1_aag(x1, x5)
append2A_out_aag(x1, x2, x3)  =  append2A_out_aag(x1, x2)
rotateD_out_ga(x1, x2)  =  rotateD_out_ga
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
append1B_in_ggga(x1, x2, x3, x4)  =  append1B_in_ggga(x1, x2, x3)
U2_ggga(x1, x2, x3, x4, x5, x6)  =  U2_ggga(x1, x6)
[]  =  []
append1B_out_ggga(x1, x2, x3, x4)  =  append1B_out_ggga(x4)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
append1C_in_ga(x1, x2)  =  append1C_in_ga(x1)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append1C_out_ga(x1, x2)  =  append1C_out_ga(x2)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

ROTATED_IN_GA(.(T16, T17), T7) → U4_GA(T16, T17, T7, append2A_in_aag(X40, X41, T17))
ROTATED_IN_GA(.(T16, T17), T7) → APPEND2A_IN_AAG(X40, X41, T17)
APPEND2A_IN_AAG(.(T32, X89), X90, .(T32, T33)) → U1_AAG(T32, X89, X90, T33, append2A_in_aag(X89, X90, T33))
APPEND2A_IN_AAG(.(T32, X89), X90, .(T32, T33)) → APPEND2A_IN_AAG(X89, X90, T33)
ROTATED_IN_GA(.(T16, T17), T7) → U5_GA(T16, T17, T7, append2A_in_aag(T20, T21, T17))
U5_GA(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → U6_GA(T16, T17, T7, append1B_in_ggga(T21, T16, T20, T7))
U5_GA(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → APPEND1B_IN_GGGA(T21, T16, T20, T7)
APPEND1B_IN_GGGA(.(T64, T65), T66, T67, .(T64, T69)) → U2_GGGA(T64, T65, T66, T67, T69, append1B_in_ggga(T65, T66, T67, T69))
APPEND1B_IN_GGGA(.(T64, T65), T66, T67, .(T64, T69)) → APPEND1B_IN_GGGA(T65, T66, T67, T69)
ROTATED_IN_GA(T86, T7) → U7_GA(T86, T7, append1C_in_ga(T86, T7))
ROTATED_IN_GA(T86, T7) → APPEND1C_IN_GA(T86, T7)
APPEND1C_IN_GA(.(T102, T103), .(T102, T105)) → U3_GA(T102, T103, T105, append1C_in_ga(T103, T105))
APPEND1C_IN_GA(.(T102, T103), .(T102, T105)) → APPEND1C_IN_GA(T103, T105)

The TRS R consists of the following rules:

rotateD_in_ga(.(T16, T17), T7) → U4_ga(T16, T17, T7, append2A_in_aag(X40, X41, T17))
append2A_in_aag(.(T32, X89), X90, .(T32, T33)) → U1_aag(T32, X89, X90, T33, append2A_in_aag(X89, X90, T33))
append2A_in_aag([], T38, T38) → append2A_out_aag([], T38, T38)
U1_aag(T32, X89, X90, T33, append2A_out_aag(X89, X90, T33)) → append2A_out_aag(.(T32, X89), X90, .(T32, T33))
U4_ga(T16, T17, T7, append2A_out_aag(X40, X41, T17)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(.(T16, T17), T7) → U5_ga(T16, T17, T7, append2A_in_aag(T20, T21, T17))
U5_ga(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → U6_ga(T16, T17, T7, append1B_in_ggga(T21, T16, T20, T7))
append1B_in_ggga(.(T64, T65), T66, T67, .(T64, T69)) → U2_ggga(T64, T65, T66, T67, T69, append1B_in_ggga(T65, T66, T67, T69))
append1B_in_ggga([], T79, T80, .(T79, T80)) → append1B_out_ggga([], T79, T80, .(T79, T80))
U2_ggga(T64, T65, T66, T67, T69, append1B_out_ggga(T65, T66, T67, T69)) → append1B_out_ggga(.(T64, T65), T66, T67, .(T64, T69))
U6_ga(T16, T17, T7, append1B_out_ggga(T21, T16, T20, T7)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(T86, T7) → U7_ga(T86, T7, append1C_in_ga(T86, T7))
append1C_in_ga(.(T102, T103), .(T102, T105)) → U3_ga(T102, T103, T105, append1C_in_ga(T103, T105))
append1C_in_ga([], []) → append1C_out_ga([], [])
U3_ga(T102, T103, T105, append1C_out_ga(T103, T105)) → append1C_out_ga(.(T102, T103), .(T102, T105))
U7_ga(T86, T7, append1C_out_ga(T86, T7)) → rotateD_out_ga(T86, T7)

The argument filtering Pi contains the following mapping:
rotateD_in_ga(x1, x2)  =  rotateD_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
append2A_in_aag(x1, x2, x3)  =  append2A_in_aag(x3)
U1_aag(x1, x2, x3, x4, x5)  =  U1_aag(x1, x5)
append2A_out_aag(x1, x2, x3)  =  append2A_out_aag(x1, x2)
rotateD_out_ga(x1, x2)  =  rotateD_out_ga
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
append1B_in_ggga(x1, x2, x3, x4)  =  append1B_in_ggga(x1, x2, x3)
U2_ggga(x1, x2, x3, x4, x5, x6)  =  U2_ggga(x1, x6)
[]  =  []
append1B_out_ggga(x1, x2, x3, x4)  =  append1B_out_ggga(x4)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
append1C_in_ga(x1, x2)  =  append1C_in_ga(x1)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append1C_out_ga(x1, x2)  =  append1C_out_ga(x2)
ROTATED_IN_GA(x1, x2)  =  ROTATED_IN_GA(x1)
U4_GA(x1, x2, x3, x4)  =  U4_GA(x4)
APPEND2A_IN_AAG(x1, x2, x3)  =  APPEND2A_IN_AAG(x3)
U1_AAG(x1, x2, x3, x4, x5)  =  U1_AAG(x1, x5)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x1, x4)
U6_GA(x1, x2, x3, x4)  =  U6_GA(x4)
APPEND1B_IN_GGGA(x1, x2, x3, x4)  =  APPEND1B_IN_GGGA(x1, x2, x3)
U2_GGGA(x1, x2, x3, x4, x5, x6)  =  U2_GGGA(x1, x6)
U7_GA(x1, x2, x3)  =  U7_GA(x3)
APPEND1C_IN_GA(x1, x2)  =  APPEND1C_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)

We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

ROTATED_IN_GA(.(T16, T17), T7) → U4_GA(T16, T17, T7, append2A_in_aag(X40, X41, T17))
ROTATED_IN_GA(.(T16, T17), T7) → APPEND2A_IN_AAG(X40, X41, T17)
APPEND2A_IN_AAG(.(T32, X89), X90, .(T32, T33)) → U1_AAG(T32, X89, X90, T33, append2A_in_aag(X89, X90, T33))
APPEND2A_IN_AAG(.(T32, X89), X90, .(T32, T33)) → APPEND2A_IN_AAG(X89, X90, T33)
ROTATED_IN_GA(.(T16, T17), T7) → U5_GA(T16, T17, T7, append2A_in_aag(T20, T21, T17))
U5_GA(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → U6_GA(T16, T17, T7, append1B_in_ggga(T21, T16, T20, T7))
U5_GA(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → APPEND1B_IN_GGGA(T21, T16, T20, T7)
APPEND1B_IN_GGGA(.(T64, T65), T66, T67, .(T64, T69)) → U2_GGGA(T64, T65, T66, T67, T69, append1B_in_ggga(T65, T66, T67, T69))
APPEND1B_IN_GGGA(.(T64, T65), T66, T67, .(T64, T69)) → APPEND1B_IN_GGGA(T65, T66, T67, T69)
ROTATED_IN_GA(T86, T7) → U7_GA(T86, T7, append1C_in_ga(T86, T7))
ROTATED_IN_GA(T86, T7) → APPEND1C_IN_GA(T86, T7)
APPEND1C_IN_GA(.(T102, T103), .(T102, T105)) → U3_GA(T102, T103, T105, append1C_in_ga(T103, T105))
APPEND1C_IN_GA(.(T102, T103), .(T102, T105)) → APPEND1C_IN_GA(T103, T105)

The TRS R consists of the following rules:

rotateD_in_ga(.(T16, T17), T7) → U4_ga(T16, T17, T7, append2A_in_aag(X40, X41, T17))
append2A_in_aag(.(T32, X89), X90, .(T32, T33)) → U1_aag(T32, X89, X90, T33, append2A_in_aag(X89, X90, T33))
append2A_in_aag([], T38, T38) → append2A_out_aag([], T38, T38)
U1_aag(T32, X89, X90, T33, append2A_out_aag(X89, X90, T33)) → append2A_out_aag(.(T32, X89), X90, .(T32, T33))
U4_ga(T16, T17, T7, append2A_out_aag(X40, X41, T17)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(.(T16, T17), T7) → U5_ga(T16, T17, T7, append2A_in_aag(T20, T21, T17))
U5_ga(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → U6_ga(T16, T17, T7, append1B_in_ggga(T21, T16, T20, T7))
append1B_in_ggga(.(T64, T65), T66, T67, .(T64, T69)) → U2_ggga(T64, T65, T66, T67, T69, append1B_in_ggga(T65, T66, T67, T69))
append1B_in_ggga([], T79, T80, .(T79, T80)) → append1B_out_ggga([], T79, T80, .(T79, T80))
U2_ggga(T64, T65, T66, T67, T69, append1B_out_ggga(T65, T66, T67, T69)) → append1B_out_ggga(.(T64, T65), T66, T67, .(T64, T69))
U6_ga(T16, T17, T7, append1B_out_ggga(T21, T16, T20, T7)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(T86, T7) → U7_ga(T86, T7, append1C_in_ga(T86, T7))
append1C_in_ga(.(T102, T103), .(T102, T105)) → U3_ga(T102, T103, T105, append1C_in_ga(T103, T105))
append1C_in_ga([], []) → append1C_out_ga([], [])
U3_ga(T102, T103, T105, append1C_out_ga(T103, T105)) → append1C_out_ga(.(T102, T103), .(T102, T105))
U7_ga(T86, T7, append1C_out_ga(T86, T7)) → rotateD_out_ga(T86, T7)

The argument filtering Pi contains the following mapping:
rotateD_in_ga(x1, x2)  =  rotateD_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
append2A_in_aag(x1, x2, x3)  =  append2A_in_aag(x3)
U1_aag(x1, x2, x3, x4, x5)  =  U1_aag(x1, x5)
append2A_out_aag(x1, x2, x3)  =  append2A_out_aag(x1, x2)
rotateD_out_ga(x1, x2)  =  rotateD_out_ga
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
append1B_in_ggga(x1, x2, x3, x4)  =  append1B_in_ggga(x1, x2, x3)
U2_ggga(x1, x2, x3, x4, x5, x6)  =  U2_ggga(x1, x6)
[]  =  []
append1B_out_ggga(x1, x2, x3, x4)  =  append1B_out_ggga(x4)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
append1C_in_ga(x1, x2)  =  append1C_in_ga(x1)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append1C_out_ga(x1, x2)  =  append1C_out_ga(x2)
ROTATED_IN_GA(x1, x2)  =  ROTATED_IN_GA(x1)
U4_GA(x1, x2, x3, x4)  =  U4_GA(x4)
APPEND2A_IN_AAG(x1, x2, x3)  =  APPEND2A_IN_AAG(x3)
U1_AAG(x1, x2, x3, x4, x5)  =  U1_AAG(x1, x5)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x1, x4)
U6_GA(x1, x2, x3, x4)  =  U6_GA(x4)
APPEND1B_IN_GGGA(x1, x2, x3, x4)  =  APPEND1B_IN_GGGA(x1, x2, x3)
U2_GGGA(x1, x2, x3, x4, x5, x6)  =  U2_GGGA(x1, x6)
U7_GA(x1, x2, x3)  =  U7_GA(x3)
APPEND1C_IN_GA(x1, x2)  =  APPEND1C_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 10 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND1C_IN_GA(.(T102, T103), .(T102, T105)) → APPEND1C_IN_GA(T103, T105)

The TRS R consists of the following rules:

rotateD_in_ga(.(T16, T17), T7) → U4_ga(T16, T17, T7, append2A_in_aag(X40, X41, T17))
append2A_in_aag(.(T32, X89), X90, .(T32, T33)) → U1_aag(T32, X89, X90, T33, append2A_in_aag(X89, X90, T33))
append2A_in_aag([], T38, T38) → append2A_out_aag([], T38, T38)
U1_aag(T32, X89, X90, T33, append2A_out_aag(X89, X90, T33)) → append2A_out_aag(.(T32, X89), X90, .(T32, T33))
U4_ga(T16, T17, T7, append2A_out_aag(X40, X41, T17)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(.(T16, T17), T7) → U5_ga(T16, T17, T7, append2A_in_aag(T20, T21, T17))
U5_ga(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → U6_ga(T16, T17, T7, append1B_in_ggga(T21, T16, T20, T7))
append1B_in_ggga(.(T64, T65), T66, T67, .(T64, T69)) → U2_ggga(T64, T65, T66, T67, T69, append1B_in_ggga(T65, T66, T67, T69))
append1B_in_ggga([], T79, T80, .(T79, T80)) → append1B_out_ggga([], T79, T80, .(T79, T80))
U2_ggga(T64, T65, T66, T67, T69, append1B_out_ggga(T65, T66, T67, T69)) → append1B_out_ggga(.(T64, T65), T66, T67, .(T64, T69))
U6_ga(T16, T17, T7, append1B_out_ggga(T21, T16, T20, T7)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(T86, T7) → U7_ga(T86, T7, append1C_in_ga(T86, T7))
append1C_in_ga(.(T102, T103), .(T102, T105)) → U3_ga(T102, T103, T105, append1C_in_ga(T103, T105))
append1C_in_ga([], []) → append1C_out_ga([], [])
U3_ga(T102, T103, T105, append1C_out_ga(T103, T105)) → append1C_out_ga(.(T102, T103), .(T102, T105))
U7_ga(T86, T7, append1C_out_ga(T86, T7)) → rotateD_out_ga(T86, T7)

The argument filtering Pi contains the following mapping:
rotateD_in_ga(x1, x2)  =  rotateD_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
append2A_in_aag(x1, x2, x3)  =  append2A_in_aag(x3)
U1_aag(x1, x2, x3, x4, x5)  =  U1_aag(x1, x5)
append2A_out_aag(x1, x2, x3)  =  append2A_out_aag(x1, x2)
rotateD_out_ga(x1, x2)  =  rotateD_out_ga
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
append1B_in_ggga(x1, x2, x3, x4)  =  append1B_in_ggga(x1, x2, x3)
U2_ggga(x1, x2, x3, x4, x5, x6)  =  U2_ggga(x1, x6)
[]  =  []
append1B_out_ggga(x1, x2, x3, x4)  =  append1B_out_ggga(x4)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
append1C_in_ga(x1, x2)  =  append1C_in_ga(x1)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append1C_out_ga(x1, x2)  =  append1C_out_ga(x2)
APPEND1C_IN_GA(x1, x2)  =  APPEND1C_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(10) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(11) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND1C_IN_GA(.(T102, T103), .(T102, T105)) → APPEND1C_IN_GA(T103, T105)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APPEND1C_IN_GA(x1, x2)  =  APPEND1C_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(12) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPEND1C_IN_GA(.(T102, T103)) → APPEND1C_IN_GA(T103)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(14) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • APPEND1C_IN_GA(.(T102, T103)) → APPEND1C_IN_GA(T103)
    The graph contains the following edges 1 > 1

(15) YES

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND1B_IN_GGGA(.(T64, T65), T66, T67, .(T64, T69)) → APPEND1B_IN_GGGA(T65, T66, T67, T69)

The TRS R consists of the following rules:

rotateD_in_ga(.(T16, T17), T7) → U4_ga(T16, T17, T7, append2A_in_aag(X40, X41, T17))
append2A_in_aag(.(T32, X89), X90, .(T32, T33)) → U1_aag(T32, X89, X90, T33, append2A_in_aag(X89, X90, T33))
append2A_in_aag([], T38, T38) → append2A_out_aag([], T38, T38)
U1_aag(T32, X89, X90, T33, append2A_out_aag(X89, X90, T33)) → append2A_out_aag(.(T32, X89), X90, .(T32, T33))
U4_ga(T16, T17, T7, append2A_out_aag(X40, X41, T17)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(.(T16, T17), T7) → U5_ga(T16, T17, T7, append2A_in_aag(T20, T21, T17))
U5_ga(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → U6_ga(T16, T17, T7, append1B_in_ggga(T21, T16, T20, T7))
append1B_in_ggga(.(T64, T65), T66, T67, .(T64, T69)) → U2_ggga(T64, T65, T66, T67, T69, append1B_in_ggga(T65, T66, T67, T69))
append1B_in_ggga([], T79, T80, .(T79, T80)) → append1B_out_ggga([], T79, T80, .(T79, T80))
U2_ggga(T64, T65, T66, T67, T69, append1B_out_ggga(T65, T66, T67, T69)) → append1B_out_ggga(.(T64, T65), T66, T67, .(T64, T69))
U6_ga(T16, T17, T7, append1B_out_ggga(T21, T16, T20, T7)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(T86, T7) → U7_ga(T86, T7, append1C_in_ga(T86, T7))
append1C_in_ga(.(T102, T103), .(T102, T105)) → U3_ga(T102, T103, T105, append1C_in_ga(T103, T105))
append1C_in_ga([], []) → append1C_out_ga([], [])
U3_ga(T102, T103, T105, append1C_out_ga(T103, T105)) → append1C_out_ga(.(T102, T103), .(T102, T105))
U7_ga(T86, T7, append1C_out_ga(T86, T7)) → rotateD_out_ga(T86, T7)

The argument filtering Pi contains the following mapping:
rotateD_in_ga(x1, x2)  =  rotateD_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
append2A_in_aag(x1, x2, x3)  =  append2A_in_aag(x3)
U1_aag(x1, x2, x3, x4, x5)  =  U1_aag(x1, x5)
append2A_out_aag(x1, x2, x3)  =  append2A_out_aag(x1, x2)
rotateD_out_ga(x1, x2)  =  rotateD_out_ga
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
append1B_in_ggga(x1, x2, x3, x4)  =  append1B_in_ggga(x1, x2, x3)
U2_ggga(x1, x2, x3, x4, x5, x6)  =  U2_ggga(x1, x6)
[]  =  []
append1B_out_ggga(x1, x2, x3, x4)  =  append1B_out_ggga(x4)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
append1C_in_ga(x1, x2)  =  append1C_in_ga(x1)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append1C_out_ga(x1, x2)  =  append1C_out_ga(x2)
APPEND1B_IN_GGGA(x1, x2, x3, x4)  =  APPEND1B_IN_GGGA(x1, x2, x3)

We have to consider all (P,R,Pi)-chains

(17) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(18) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND1B_IN_GGGA(.(T64, T65), T66, T67, .(T64, T69)) → APPEND1B_IN_GGGA(T65, T66, T67, T69)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APPEND1B_IN_GGGA(x1, x2, x3, x4)  =  APPEND1B_IN_GGGA(x1, x2, x3)

We have to consider all (P,R,Pi)-chains

(19) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPEND1B_IN_GGGA(.(T64, T65), T66, T67) → APPEND1B_IN_GGGA(T65, T66, T67)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(21) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • APPEND1B_IN_GGGA(.(T64, T65), T66, T67) → APPEND1B_IN_GGGA(T65, T66, T67)
    The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3

(22) YES

(23) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND2A_IN_AAG(.(T32, X89), X90, .(T32, T33)) → APPEND2A_IN_AAG(X89, X90, T33)

The TRS R consists of the following rules:

rotateD_in_ga(.(T16, T17), T7) → U4_ga(T16, T17, T7, append2A_in_aag(X40, X41, T17))
append2A_in_aag(.(T32, X89), X90, .(T32, T33)) → U1_aag(T32, X89, X90, T33, append2A_in_aag(X89, X90, T33))
append2A_in_aag([], T38, T38) → append2A_out_aag([], T38, T38)
U1_aag(T32, X89, X90, T33, append2A_out_aag(X89, X90, T33)) → append2A_out_aag(.(T32, X89), X90, .(T32, T33))
U4_ga(T16, T17, T7, append2A_out_aag(X40, X41, T17)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(.(T16, T17), T7) → U5_ga(T16, T17, T7, append2A_in_aag(T20, T21, T17))
U5_ga(T16, T17, T7, append2A_out_aag(T20, T21, T17)) → U6_ga(T16, T17, T7, append1B_in_ggga(T21, T16, T20, T7))
append1B_in_ggga(.(T64, T65), T66, T67, .(T64, T69)) → U2_ggga(T64, T65, T66, T67, T69, append1B_in_ggga(T65, T66, T67, T69))
append1B_in_ggga([], T79, T80, .(T79, T80)) → append1B_out_ggga([], T79, T80, .(T79, T80))
U2_ggga(T64, T65, T66, T67, T69, append1B_out_ggga(T65, T66, T67, T69)) → append1B_out_ggga(.(T64, T65), T66, T67, .(T64, T69))
U6_ga(T16, T17, T7, append1B_out_ggga(T21, T16, T20, T7)) → rotateD_out_ga(.(T16, T17), T7)
rotateD_in_ga(T86, T7) → U7_ga(T86, T7, append1C_in_ga(T86, T7))
append1C_in_ga(.(T102, T103), .(T102, T105)) → U3_ga(T102, T103, T105, append1C_in_ga(T103, T105))
append1C_in_ga([], []) → append1C_out_ga([], [])
U3_ga(T102, T103, T105, append1C_out_ga(T103, T105)) → append1C_out_ga(.(T102, T103), .(T102, T105))
U7_ga(T86, T7, append1C_out_ga(T86, T7)) → rotateD_out_ga(T86, T7)

The argument filtering Pi contains the following mapping:
rotateD_in_ga(x1, x2)  =  rotateD_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
append2A_in_aag(x1, x2, x3)  =  append2A_in_aag(x3)
U1_aag(x1, x2, x3, x4, x5)  =  U1_aag(x1, x5)
append2A_out_aag(x1, x2, x3)  =  append2A_out_aag(x1, x2)
rotateD_out_ga(x1, x2)  =  rotateD_out_ga
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x4)
append1B_in_ggga(x1, x2, x3, x4)  =  append1B_in_ggga(x1, x2, x3)
U2_ggga(x1, x2, x3, x4, x5, x6)  =  U2_ggga(x1, x6)
[]  =  []
append1B_out_ggga(x1, x2, x3, x4)  =  append1B_out_ggga(x4)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
append1C_in_ga(x1, x2)  =  append1C_in_ga(x1)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append1C_out_ga(x1, x2)  =  append1C_out_ga(x2)
APPEND2A_IN_AAG(x1, x2, x3)  =  APPEND2A_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains

(24) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(25) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND2A_IN_AAG(.(T32, X89), X90, .(T32, T33)) → APPEND2A_IN_AAG(X89, X90, T33)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APPEND2A_IN_AAG(x1, x2, x3)  =  APPEND2A_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains

(26) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(27) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPEND2A_IN_AAG(.(T32, T33)) → APPEND2A_IN_AAG(T33)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(28) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • APPEND2A_IN_AAG(.(T32, T33)) → APPEND2A_IN_AAG(T33)
    The graph contains the following edges 1 > 1

(29) YES